package com.frejoys.service;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.frejoys.common.dto.common.IdDto;
import com.frejoys.common.dto.common.platform.PlatformUpDto;
import com.frejoys.common.vo.admin.PlatformVo;
import com.frejoys.dao.entity.Platform;

public interface PlatformService extends IService<Platform> {

    default Platform getOnly(QueryWrapper<Platform> wrapper) {
        wrapper.last("limit 1");
        return this.getOne(wrapper);
    }

    default Platform getOnly(LambdaQueryWrapper<Platform> wrapper) {
        wrapper.last("limit 1");
        return this.getOne(wrapper);
    }

    Platform getInfo();

    //编辑平台设置
    boolean upPlatform(PlatformUpDto dto);

    //查看平台设置
    PlatformVo platformInfo(IdDto dto);
}
